<!DOCTYPE html>
<html lang="zh-CN">
    <head>
             <title>话题</title>
             <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style/comments.css">
 <link rel="stylesheet" href="style/sideNavi.css">
<link rel="stylesheet" href="style/footer.css">
<link rel="stylesheet" href="style/searchBox.css">
<link rel="stylesheet" href="style/loading.css">
  
	</head>
	<body>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --primary-color: #4a6bff;
            --secondary-color: #6c87ff;
            --accent-color: #ff6b6b;
            --background-color: #f8f9fa;
            --card-bg: #ffffff;
            --text-primary: #333333;
            --text-secondary: #666666;
            --text-light: #888888;
            --border-color: #e0e0e0;
            --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --gradient: linear-gradient(135deg, #4a6bff 0%, #6c87ff 100%);
        }

        body {
            background-color: var(--background-color);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            background-image: url('../resources/images/bg1.webp');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            position: relative;
        }

        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.85);
            z-index: -1;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        /* 问题板块 */
        .question-section {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px;
            padding: 30px;
            margin: 30px 0;
            box-shadow: var(--shadow);
        }

        .question-title {
            font-size: 28px;
            margin-bottom: 20px;
            color: var(--text-primary);
            line-height: 1.4;
        }

        .question-content {
            font-size: 18px;
            line-height: 1.6;
            color: var(--text-secondary);
            margin-bottom: 25px;
        }

        .question-meta {
            display: flex;
            gap: 20px;
            color: var(--text-light);
            font-size: 14px;
            padding-top: 15px;
            border-top: 1px solid var(--border-color);
        }

        .question-tags {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .tag {
            padding: 6px 14px;
            background: rgba(74, 107, 255, 0.1);
            color: var(--primary-color);
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
        }

        /* 评论区样式 */
        .box {
            width: 85%;
            max-width: 800px;
            margin: 0 auto 40px;
            background: linear-gradient(135deg,
                rgba(74, 108, 247, 0.3) 0%,
                rgba(74, 108, 247, 0.1) 100%);
            background-size: 200% 200%;
            animation: shine 5s infinite linear;
            border-radius: 12px;
            position: relative;
            overflow: hidden;
            box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.8);
        }

        @keyframes shine {
            0% {
                background-position: 0% 0%;
            }
            50% {
                background-position: 100% 100%;
            }
            100% {
                background-position: 0% 0%;
            }
        }

        .container-comments {
            position: relative;
            width: 100%;
            box-sizing: border-box;
            padding: 20px 3%;
        }

        .container-comments>div {
            width: 100%;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 20px;
            box-sizing: border-box;
            padding: 20px;
            padding-top: 30px;
            box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.8);
            margin-bottom: 20px;
        }

        .tit {
            color: #4a6cf7;
            font-size: 24px;
            letter-spacing: 2px;
            margin-bottom: 25px;
            font-weight: bold;
        }

        .container-comments>.right {
            min-height: 400px;
        }

        .container-comments>.left {
            height: auto;
        }

        .container-comments>.left>.item {
            margin-bottom: 25px;
        }

        .container-comments>.left>.item>* {
            background: #fff;
            width: 100%;
            border-radius: 5px;
            border: 1px solid rgba(74, 108, 247, 0.2);
            outline: none;
            padding-left: 15px;
            box-sizing: border-box;
        }

        .container-comments>.left>.item>input {
            height: 50px;
        }

        .container-comments>.left>.item>textarea {
            height: 200px;
            padding-top: 10px;
            resize: none;
        }

        .btn>button {
            border: none;
            height: 45px;
            border-radius: 10px;
            width: 40%;
            color: #fff;
            font-weight: bold;
            font-size: 16px;
            letter-spacing: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn>button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
        }

        .list {
            height: 300px;
            overflow: hidden;
            overflow-y: auto;
        }

        .list>.item {
            padding: 10px;
            box-sizing: border-box;
            margin-bottom: 25px;
            border-radius: 10px;
        }

        .list>.item>.top>div {
            display: flex;
            align-items: center;
            font-size: 14px;
            font-weight: bold;
            color: #4a6cf7;
        }

        .list>.item>.top>div>img {
            width: 40px;
            height: 40px;
            border-radius: 100%;
            margin-right: 5px;
            border: 2px solid #4a6cf7;
        }

        .list>.item>.top>span {
            font-size: 12px;
            color: #666;
        }

        .list>.item>.btm {
            color: #333;
            margin-top: 10px;
            font-size: 14px;
            line-height: 1.5;
        }

        .yining {
            box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
        }

        .bg {
            background: linear-gradient(135deg, #cbd2f1,#4a6cf7);
        }

        .userid {
            color: gold;
        }

        .flexsb {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* 页脚 */
        .footer {
            background: rgba(255, 255, 255, 0.95);
            padding: 40px 0 20px;
            margin-top: auto;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .footer-section h3 {
            margin-bottom: 20px;
            color: var(--text-primary);
            font-size: 18px;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section ul li {
            margin-bottom: 10px;
            color: var(--text-secondary);
        }

        .footer-bottom {
            text-align: center;
            padding-top: 20px;
            margin-top: 30px;
            border-top: 1px solid var(--border-color);
            color: var(--text-light);
            font-size: 14px;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .nav-container {
                flex-direction: column;
                gap: 15px;
            }
            
            .nav-links {
                flex-wrap: wrap;
                justify-content: center;
            }
            
            .question-title {
                font-size: 24px;
            }
            
            .question-content {
                font-size: 16px;
            }
            
            .box {
                width: 95%;
            }
        }
    </style>
</head>
<body>

    <div class="global-loader" id="globalLoader">
    <div class="loader-ring"></div>
    <p class="loading-text">加载中...</p>
    <div class="progress-bar">
      <div class="progress" id="loaderProgress"></div>
    </div>
  </div>

	 <div id="app">
        <!-- 侧边导航栏 -->
        <div class="shell-container">
            <nav class="shell">
                <div class="logo">
                    <i class="fas fa-hands-helping" style="font-size: 32px; color: #4a6bff;"></i>
                    <span class="logo-text">SkillShare</span>
                </div>
                <a href="forum.html" class="shell__item " id="homelink">
                    <i class="shell__icon fas fa-home"></i>
                    <span class="shell__title">首页</span>
                </a>
                <a href="#" class="shell__item">
                  <i class="shell__icon fas fa-layer-group"></i>
                    <span class="shell__title">帖子列表</span>
                </a>
                <a  @click="goToProfile" class="shell__item">
                    <i class="shell__icon fas fa-user"></i>
                    <span class="shell__title">个人中心</span>
                </a>
                <a href="#postlist" class="shell__item active">
                    <i class="shell__icon fas fa-comments"></i>
                    <span class="shell__title">话题</span>
                </a>
                <a href="#footer" class="shell__item">
                    <i class="shell__icon fas fa-info-circle"></i>
                    <span class="shell__title">关于我们</span>
                </a>
                <a href="#footer" class="shell__item">
                    <i class="shell__icon fas fa-phone-alt"></i>
                    <span class="shell__title">联系我们</span>
                </a>
            </nav>
        </div>


    <!-- 主内容区域 -->
    <div class="container">
        <!-- 问题板块 -->
        <section class="question-section">
            <h1 class="question-title">如何平衡学习和社团活动？分享你的时间管理技巧</h1>
            <p class="question-content">大学生活中，学习和社团活动都很重要，但时间有限。大家有什么好的时间管理方法可以分享吗？</p>
            
            <div class="question-meta">
                <span><i class="far fa-user"></i>Alfred</span>
                <span><i class="far fa-clock"></i>one day ago</span>
                <span><i class="far fa-comment"></i> 42comments</span>
                <span><i class="fas fa-eye"></i> 356views</span>
            </div>
            
            <div class="question-tags">
                <span class="tag">学习技巧</span>
                <span class="tag">时间管理</span>
                <span class="tag">大学生活</span>
                <span class="tag">社团活动</span>
            </div>
        </section>
        <!-- 伪评论区 -->
		<div class="box">
			<div class="container">
				<div class="left">
					<div class="tit">COMMENTS</div>
					
					<div class="item yining"><textarea placeholder="Please enter your comments……" class="text"></textarea></div>
					<div class="btn flexsb">
						<button class="yining OK bg">submit</button>
						<button class="yining clear bg">clear</button>
						
					</div>
				</div>
				<div class="right">
					<div class="tit">All Comments</div>
					<div class="list">
						<div class="item yining bg">
							<div class="top flexsb">
								<div>
									<img src="../resources/images/chuyin.jpg" alt="User avatar" />
									<div class="userid">20243004468 </div>
								</div>
								<span>Date:2025/10/22 07:42:35</span>
							</div>
							<div class="btm">
								Welcom to talk together!
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		 <!-- 尾页 -->
        <section id="footer">
            <div class="footer-content">
                <div class="footer-section">
                    <h3>联系方式</h3>
                    <ul class="contact-info">
                        <li><i class="fas fa-map-marker-alt"></i>HNU 24RG1 GROUP3</li>
                        <li><i class="fas fa-phone"></i>138 631 16608</li>
                        <li><i class="fas fa-envelope"></i> danube803@gmai.com</li>
                    </ul>
                    <div class="social-icons">
                        <a href="#"><i class="fab fa-weixin"></i></a>
                        <a href="#"><i class="fab fa-weibo"></i></a>
                        <a href="#"><i class="fab fa-github"></i></a>
                        <a href="#"><i class="fab fa-linkedin"></i></a>
                    </div>
                </div>
                
                <div class="footer-section">
                    <h3>开发团队</h3>
                    <ul class="developers">
                        <li>黄圣源/Alfred - Core Interaction</li>
                        <li>蔡蓝硕/David - Document Archiving</li>
                        <li>金李建/Avery - Visual Design</li>
                        <li>卢琮元/Yuan - Components&Functions</li>
                        <li>柳家伟/Kawaiii - API Debugging&Testing</li>
                        <li>赵 聪/Eilidh- Material Collection</li>
                    </ul>
                </div>
                
                <div class="footer-section">
                    <h3>开发参考</h3>
                    <ul class="links">
                        <li><a href="https://developer.mozilla.org/" target="_blank">MDN Web文档</a></li>
                        <li><a href="https://www.w3schools.com/" target="_blank">W3Schools在线教程</a></li>
                        <li><a href="https://stackoverflow.com/" target="_blank">Stack Overflow开发者社区</a></li>
                    </ul>
                </div>
            </div>
            
            <div class="footer-bottom">
                <p>&copy; 2025 HNU. 保留所有权利. | 隐私政策 | 使用条款</p>
            </div>
        </section>
		<script>
			window.onclick = function() {
				document.querySelector('.OK').onclick = function() {
					
					let text = document.querySelector('.text').value;
					let now = new Date().toLocaleString();
					if ( text == '') {
						alert('输入框不能为空！');
						return;
					}
					document.querySelector('.list').innerHTML += `
						<div class="item yining bg">
							<div class="top flexsb">
								<div>
									<img src="../resources/images/chuyin.jpg" alt="User avatar" />
									<div class="userid">unkown</div>
								</div>
								<span>Date:${now}</span>
							</div>
							<div class="btm">
								${text}
							</div>
						</div>
					`
					clear();
				}

				function clear() {
				
					document.querySelector('.text').value = '';
				}
				document.querySelector('.clear').onclick = clear;
			}
            // 等待DOM加载完成
document.addEventListener('DOMContentLoaded', function() {
    // 获取id为homelink的a标签
    const homeLink = document.getElementById('homelink');
    
    // 为标签添加点击事件监听
    if (homeLink) {
        homeLink.addEventListener('click', function(e) {
            // 阻止<a>标签的默认跳转行为
            e.preventDefault();
            // 跳转到同一目录下的forum.html
            window.location.href = 'forum.html';
        });
    }
});

// 获取加载画面元素
    const loader = document.getElementById('globalLoader');
    const progressBar = document.getElementById('loaderProgress');
    let progressTimer = null;

    // 显示加载画面并模拟进度
    function showLoader() {
      loader.classList.add('show'); // 显示加载画面
      progressBar.style.width = '0%'; // 重置进度条
      
      // 模拟进度增长（每次+5%~10%）
      let progress = 0;
      clearInterval(progressTimer);
      progressTimer = setInterval(() => {
        progress += Math.random() * 5 + 5; // 5%-10% 随机增长
        if (progress >= 90) { // 最多到90%，留10%等页面加载完成
          progress = 90;
          clearInterval(progressTimer);
        }
        progressBar.style.width = progress + '%';
      }, 200);
    }

    // 隐藏加载画面（补全进度）
    function hideLoader() {
      progressBar.style.width = '100%'; // 进度条拉满
      setTimeout(() => {
        loader.classList.remove('show'); // 隐藏加载画面
        clearInterval(progressTimer);
      }, 300); // 等待进度条动画完成
    }

    // 示例1：页面加载时显示加载画面（模拟初始加载）
    window.addEventListener('load', () => {
      // 页面加载完成后隐藏
      hideLoader();
    });
    // 页面开始加载时显示
    showLoader();

    // 示例2：点击链接跳转时显示加载画面
    const links = document.querySelectorAll('.nav-link');
    links.forEach(link => {
      link.addEventListener('click', (e) => {
        // 阻止默认跳转，先显示加载画面
        e.preventDefault();
        const targetUrl = link.href;
        
        showLoader();
        // 延迟300ms跳转（让用户看到加载动画）
        setTimeout(() => {
          window.location.href = targetUrl;
        }, 900);
      });
    });
		</script>
    
   
        </body>
        </html>